﻿using System;
using System.Windows.Forms;

using Rsdn.Janus.ObjectModel;
using Rsdn.SmartApp;

namespace Rsdn.Janus
{
    /// <summary>
    /// Дефолтная реализация гуя фичи с вложенными узлами.
    /// </summary>
    public partial class FolderDummyForm : UserControl, IFeatureView
    {
        public FolderDummyForm(IServiceProvider provider, IFeature folderFeature)
        {
            if (provider == null)
            {
                throw new ArgumentNullException("provider");          //MLHIDE
            }
            if (folderFeature == null)
            {
                throw new ArgumentNullException("folderFeature");     //MLHIDE
            }

            InitializeComponent();

            var styleImageManager = provider.GetRequiredService<IStyleImageManager>();

            _pictureBox.Image = styleImageManager.GetImage("folder", StyleImageType.ConstSize); //MLHIDE

            _label.Text = folderFeature.Description;
        }

        #region IFeatureView Members

        void IFeatureView.Activate(IFeature feature) { }
        public void ActivateView()
        {
            // Nothing to do
        }

        public void DeactivateView()
        {
            // Nothing to do
        }

        void IFeatureView.Refresh() { }

        void IFeatureView.ConfigChanged() { }

        public void Clear()
        {
            // nothing to do
        }

        #endregion
    }
}
